﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmissionRegistryEnquiry.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.AdmissionRegistry.AdmissionRegistryEnquiry" %>

<%--
delete by gordon 20150824
<%@ OutputCache Duration="60" VaryByParam="none" %>--%>
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link id="cssWait" rel="stylesheet" type="text/css" />
    <%-- add by gordon 20150812 | For Search Wait Cursor --%>
    <script type="text/jscript" language="JavaScript" src="../../Javascript/CommonFunction.js"></script>
    <script type="text/javascript" src="../../Javascript/MainMenuScript.js"></script>
    <script src="../../Javascript/SOM/Common.js" type="text/javascript"></script>
    <style type="text/css">
        .HandCursorClass
        {
            cursor: pointer;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function ShowDetails(clientID) {
            window.showModalDialog("../Popup/ShowDetails.aspx?PageID=COM&ID=" + clientID.id, window, "dialogHeight:250px;dialogWidth:300px,center:yes,resizable:no,scroll:no,status:no");
            return false;
        }

        function ChangeFreeTextSearchStatus(obj) {
            if (document.all['rdoAnd'].checked == true) {
                document.all['rdoAnd'].checked = "checked"
            }
            else {
                document.all['rdoOr'].checked = "checked"
            }
            if (obj.checked == true) {
                document.all['TxtConditionOne'].disabled = '';
                document.all['TxtConditionTwo'].disabled = '';
                document.all['TxtConditionThree'].disabled = '';
                document.getElementById("rdoAnd").disabled = false;
                document.getElementById("rdoOr").disabled = false;
                document.all['TxtConditionOne'].focus();
                //        document.all['rdoAnd'].checked = "checked";;
            }
            else {
                document.all['TxtConditionOne'].disabled = 'disabled';
                document.all['TxtConditionTwo'].disabled = 'disabled';
                document.all['TxtConditionThree'].disabled = 'disabled';
                document.getElementById("rdoAnd").disabled = true;
                document.getElementById("rdoOr").disabled = true;
            }
        }
        function PageOnload() {
            document.getElementById("rdoAnd").disabled = true;
            document.getElementById("rdoOr").disabled = true;
            ChangeFreeTextSearchStatus(document.getElementById("chkFreeTextSearch"));


        }
        ///add by benson 2015-06-29 begin
        function WriteCookie(name, vaue) {
            document.cookie = name + "=IP=" + vaue;
        }
        function readCookie(name) {
            m = document.cookie;
            re1 = new RegExp("(?!\w)" + name + "=[^;]+", "");
            re2 = new RegExp("^" + name + "=", "");
            try {

                var a = m.match(re1)[0];
            }
            catch (e) {
                return null
            }
            eval("var o=" + a.replace(re2, "{").replace(/&/g, "',").replace(/=/g, ":\'") + "'}");
            return o;
        }

        function setSearchCookie() {
            document.getElementById("BFSearc").click();
            //                // edit by jack 20151130 for cookie save
            //                //var station = GetCookie("AdmissionRegistryEnquiry_station");
            //                var AdmissionRegistry = eval('(' + GetCookie("AdmissionRegistry_Common") + ')');
            //                var station = AdmissionRegistry.Station;
            //                if (station != "" && station != null) {
            //                    document.getElementById("ddlStation").value = station;

            //             
            //                    //SetCookie("AdmissionRegistryEnquiry_station", "");
            //                    //document.getElementById("dtbCreateTimeFrom_dateTextBox").value = GetCookie("AdmissionRegistryEnquiry_dateFrom");
            //                    //document.getElementById("dtbCreateTimeTo_dateTextBox").value = GetCookie("AdmissionRegistryEnquiry_dateTo");
            //                    document.getElementById("dtbCreateTimeFrom_dateTextBox").value = AdmissionRegistry.DateFrom;
            //                    document.getElementById("dtbCreateTimeTo_dateTextBox").value = AdmissionRegistry.DateTo;

            //                    // edit by jack 20151130 for cookie save
            //                    //var showValue = GetCookie("AdmissionRegistryEnquiry_showlist");
            //                    var showValue = AdmissionRegistry.List;
            //                    setChackboxListValue("cblShow", showValue);
            //                    //                    if (GetCookie("AdmissionRegistryEnquiry_workCategory") != "") {
            //                    //                        var objworkCategory = document.getElementById("ddlWorkCategory");
            //                    //                        for (var i = 0; i < objworkCategory.options.length; i++) {
            //                    //                            if (objworkCategory.options[i].value == GetCookie("AdmissionRegistryEnquiry_workCategory")) {
            //                    //                                objworkCategory.options[i].selected = true;
            //                    //                                SetCookie("AdmissionRegistryEnquiry_workCategory", "");
            //                    //                                __doPostBack("ddlWorkCategory", "");
            //                    //                            }
            //                    //                        }
            //                    //                    }

            //                    // edit by jack 20151130 for cookie save
            //                    //document.getElementById("ddlWorkCategory").value = GetCookie("AdmissionRegistryEnquiry_workCategory");
            //                    document.getElementById("ddlWorkCategory").value = AdmissionRegistry.WorkCategory;

            //                    // edit by jack 20151130 for cookie save
            //                    //if (GetCookie("AdmissionRegistryEnquiry_workCategory") == "0") {
            //                    if (AdmissionRegistry.WorkCategory == "0") {
            //                        // edit by jack 20151130 for cookie save
            //                        //document.getElementById("ddlSubCategory").value = GetCookie("AdmissionRegistryEnquiry_SubCategory");
            //                        document.getElementById("ddlSubCategory").value = AdmissionRegistry.SubCategory;
            //                        document.getElementById("<%=TextGenSubCategory.ClientID%>").value = "";
            //                    } else {
            //                        // edit by jack 20151130 for cookie save
            //                        document.getElementById("ddlSubCategory").value = AdmissionRegistry.SubCategory;
            //                        //document.getElementById("<%=TextGenSubCategory.ClientID%>").value = GetCookie("AdmissionRegistryEnquiry_SubCategory");
            //                    }

            //                    // edit by jack 20151130 for cookie save 
            //                    //if (GetCookie("AdmissionRegistryEnquiry_FreeTextSearch").toUpperCase() == "TRUE") {
            //                    if (AdmissionRegistry.FreeTextSearch.toUpperCase() == "TRUE") {
            //                        document.getElementById("chkFreeTextSearch").checked = true;
            //                        ChangeFreeTextSearchStatus(document.getElementById("chkFreeTextSearch"));
            //                    } else {
            //                        document.getElementById("chkFreeTextSearch").checked = false;
            //                        ChangeFreeTextSearchStatus(document.getElementById("chkFreeTextSearch"));
            //                    }
            //                    // edit by jack 20151130 for cookie save
            //                    //if (GetCookie("AdmissionRegistryEnquiry_TxtConditionOne") != "") {
            //                    if (AdmissionRegistry.ConditionOne != "") {
            //                        //added by Nathan 2015-08-15
            //                        //document.getElementById("TxtConditionOne").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionOne");

            //                        // edit by jack 20151130 for cookie save
            //                        //document.getElementById("TextOne").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionOne");
            //                        document.getElementById("TextOne").value = AdmissionRegistry.ConditionOne;
            //                    }
            //                    // edit by jack 20151130 for cookie save
            //                    //if (GetCookie("AdmissionRegistryEnquiry_TxtConditionTwo") != "") {
            //                    if (AdmissionRegistry.ConditionTwo != "") {
            //                        //added by Nathan 2015-08-15
            //                        // document.getElementById("TxtConditionTwo").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionTwo");

            //                        // edit by jack 20151130 for cookie save
            //                        //document.getElementById("TextTwo").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionTwo");
            //                        document.getElementById("TextTwo").value = AdmissionRegistry.ConditionTwo;
            //                    }
            //                    // edit by jack 20151130 for cookie save
            //                    //if (GetCookie("AdmissionRegistryEnquiry_TxtConditionThree") != "") {
            //                    if (AdmissionRegistry.ConditionThree != "") {
            //                        //added by Nathan 2015-08-15
            //                        // document.getElementById("TxtConditionThree").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionThree");
            //                        // edit by jack 20151130 for cookie save
            //                        //document.getElementById("TextThree").value = GetCookie("AdmissionRegistryEnquiry_TxtConditionThree");
            //                        document.getElementById("TextThree").value = AdmissionRegistry.ConditionThree;
            //                    }
            //                    var v = 1;
            //                    //if (GetCookie("AdmissionRegistryEnquiry_rdoAnd").toUpperCase() == "TRUE") {
            //                    if (AdmissionRegistry.Rand.toUpperCase() == "TRUE") {
            //                        document.getElementById("rdoAnd").checked = true;
            //                        v = 1;
            //                    } else {
            //                        document.getElementById("rdoAnd").checked = false;
            //                    }
            //                    // edit by jack 20151130 for cookie save
            //                    //if (GetCookie("AdmissionRegistryEnquiry_rdoOr").toUpperCase() == "TRUE") {
            //                    if (AdmissionRegistry.Ror.toUpperCase() == "TRUE") {
            //                        document.getElementById("rdoOr").checked = true;
            //                    } else {
            //                        document.getElementById("rdoOr").checked = false;
            //                    }
            //                    document.getElementById("TextRadio").value = v;
            //                }
            //                // edit by jack 20151130 for cookie save
            //                //                SetCookie("AdmissionRegistryEnquiry_rdoAnd", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_rdoOr", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_FreeTextSearch", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_TxtConditionOne", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_TxtConditionTwo", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_TxtConditionThree", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_dateFrom", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_dateTo", "");
            //                var pathName = window.document.location.pathname;
            //                var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            //                SetCookie("AdmissionRegistry_Common", "", -1000, projectName + "/");
            //               

        }
        ///add by benson 2015-06-29 end
        function OpenEntryPageMaximum(url)  //huangyao 20081129 in MTR office
        {
            /*******************add by jack 20151202 for using session store enquiry condition start**********************/
            document.getElementById("<%=HiddenFieldUrl.ClientID %>").value = url;
            document.getElementById("<%=btnSetSession.ClientID %>").click();
            //debugger;
            //var aaa = url;
            //xopen(url, window.screen.width, window.screen.height,'yes',null);
            //xopen(url, 1024, 768,'yes',null);
            //alert("test by huangyao");
            //  window.moveTo(0,0);   
            //  window.resizeTo(screen.availWidth,screen.availHeight);   
            //  window.outerWidth=screen.availWidth;   
            //  window.outerHeight=screen.availHeight;   

            //      newwin=window.open("","","scrollbars=yes, toolbar=yes, menubar=yes, location=yes, status=yes, resizable=yes");
            //      if   (document.all)
            //      {   
            //        newwin.moveTo(0,0);   
            //        newwin.resizeTo(screen.width,screen.height - 25);
            //      }   
            //      newwin.location=url;

            ///add by benson 2015-06-29 begin
            //            var station = document.getElementById("ddlStation").value;
            //            var dateFrom;
            //            var dateTo;

            //            var inputAll = document.getElementsByTagName("input");
            //            for (var i = 0; i < inputAll.length; i++) {
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbCreateTimeFrom") >= 0) {
            //                    dateFrom = inputAll[i].value;
            //                }
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbCreateTimeTo") >= 0) {
            //                    dateTo = inputAll[i].value;
            //                }
            //            }

            //            var showlist = getChackboxListValue("cblShow");
            //            //            var objworkCategory = document.getElementById("ddlWorkCategory");           
            //            //            var workCategory = objworkCategory.options[objworkCategory.selectedIndex].value;

            //            var workCategory = document.getElementById("ddlWorkCategory").value;
            //            //            var objSubCategory = document.getElementById("ddlSubCategory");
            //            //            var SubCategory = objSubCategory.options[objSubCategory.selectedIndex].value;

            //            var SubCategory;
            //            if (workCategory == "0") {
            //                SubCategory = document.getElementById("ddlSubCategory").value;
            //            } else {
            //                var obj = document.getElementById('ddlSubCategory');
            //                SubCategory = obj.options[obj.selectedIndex].text; //获取文本
            //            }

            //            var FreeTextSearch = document.getElementById("chkFreeTextSearch").checked;
            //            //added by Nathan 2015-08-15
            //            //            var TxtConditionOne = document.getElementById("TxtConditionOne").value;//added by Nathan 2015-08-15
            //            //            var TxtConditionTwo = document.getElementById("TxtConditionTwo").value;//added by Nathan 2015-08-15
            //            //            var TxtConditionThree = document.getElementById("TxtConditionThree").value;//added by Nathan 2015-08-15

            //            var TxtConditionOne = document.getElementById("TextOne").value; //added by Nathan 2015-08-15
            //            var TxtConditionTwo = document.getElementById("TextTwo").value; //added by Nathan 2015-08-15
            //            var TxtConditionThree = document.getElementById("TextThree").value; //added by Nathan 2015-08-15

            //            var rdoAnd = document.getElementById("rdoAnd").checked;
            //            var rdoOr = document.getElementById("rdoOr").checked;


            // edit by jack 20151130 for cookie save
            //            WriteCookie("AdmissionRegistryEnquiry_SubCategory2", SubCategory);
            //            SetCookie("AdmissionRegistryEnquiry_station", station);
            //            SetCookie("AdmissionRegistryEnquiry_dateFrom", dateFrom);
            //            SetCookie("AdmissionRegistryEnquiry_dateTo", dateTo);
            //            SetCookie("AdmissionRegistryEnquiry_showlist", showlist);
            //            SetCookie("AdmissionRegistryEnquiry_workCategory", workCategory);
            //            SetCookie("AdmissionRegistryEnquiry_SubCategory", SubCategory);
            //            SetCookie("AdmissionRegistryEnquiry_FreeTextSearch", FreeTextSearch);
            //            SetCookie("AdmissionRegistryEnquiry_TxtConditionOne", TxtConditionOne);
            //            SetCookie("AdmissionRegistryEnquiry_TxtConditionTwo", TxtConditionTwo);
            //            SetCookie("AdmissionRegistryEnquiry_TxtConditionThree", TxtConditionThree);
            //            SetCookie("AdmissionRegistryEnquiry_rdoAnd", rdoAnd);
            //            SetCookie("AdmissionRegistryEnquiry_rdoOr", rdoOr);
            //window.location.href = (url + "&isBack=1&PageID=AdmissionRegistryEnquiry");
            ///add by benson 2015-06-29 end
            /*******************add by jack 20151202 for using session store enquiry condition end**********************/
        }
    </script>
</head>
<body onload="PageOnload();">
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <!-------add by jack 20151202 for using session store enquiry condition start----->
    <asp:HiddenField ID="HiddenFieldUrl" runat="server" />
    <asp:Button ID="btnSetSession" runat="server" Text="SetSession" OnClick="btnSetSession_Click"
        Style="display: none" />
    <!-------add by jack 20151202 for using session store enquiry condition end----->
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1401" />
            </td>
            <td class="Page_Right" style="width: 100%">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140101" ParentMenuID="M1401" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <%-- Add By Gordon 20150701 Fix If User Click Search Button,The NewsBar will stop working --%>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnOutPut" />
                                </Triggers>
                                <ContentTemplate>
                                    <div id="searchcondition" style="width: 98.5%; float: left; border-width: 1px; border-color: #aaaaaa;
                                        border-style: solid; background-color: #eeeeee; padding-left: 10px;">
                                        <div style="float: left; padding-top: 7px; width: 6%; padding-left: 1px;">
                                            <asp:Label ID="lblStationLable" runat="server"></asp:Label>
                                        </div>
                                        <div style="float: left; padding-top: 3px; padding-left: 1px;">
                                            <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                            </asp:DropDownList>
                                        </div>
                                        <div id="getdatetime" style="float: left; padding-top: 2px; padding-left: 12px;">
                                            <asp:Label ID="lblFlagTimeFrom" runat="server"></asp:Label>&nbsp;<APJ:DateTextBox
                                                ID="dtbCreateTimeFrom" runat="server" />
                                        </div>
                                        <div id="Div1" style="float: left; padding-top: 2px; padding-left: 8px;">
                                            <asp:Label ID="lblFlageTimeTo" runat="server"></asp:Label>&nbsp;<APJ:DateTextBox
                                                ID="dtbCreateTimeTo" runat="server" />
                                        </div>
                                        <div id="display" style="float: left; padding-top: 1px; padding-left: 10px;">
                                            <asp:Label ID="lblFlagDisplay" runat="server"></asp:Label><asp:CheckBoxList ID="cblShow"
                                                runat="server" CssClass="tableborder" RepeatColumns="4" RepeatDirection="Horizontal"
                                                RepeatLayout="Flow">
                                            </asp:CheckBoxList>
                                        </div>
                                        <%--<div style="float:left; padding-bottom: 2px; padding-top: 3px;">
                              </div>--%>
                                        <div id="RowSecond" style="float: left; width: 99%;">
                                            <asp:UpdatePanel ID="work" runat="server">
                                                <ContentTemplate>
                                                    <div id="workcategory" style="padding-top: 5px; float: left; width: 16.1%;">
                                                        <asp:Label ID="lblFlagWorkCategory" runat="server"></asp:Label>
                                                    </div>
                                                    <div id="Div2" style="padding-top: 2px; float: left; width: 33%;">
                                                        <asp:DropDownList ID="ddlWorkCategory" runat="server" Width="220px" OnSelectedIndexChanged="ddlWorkCategory_SelectedIndexChanged"
                                                            AutoPostBack="True">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div id="worksubcategory" style="padding-top: 5px; float: left; width: 15%;">
                                                        <asp:Label ID="lblSubCategory" runat="server"></asp:Label>
                                                    </div>
                                                    <div id="Div3" style="padding-top: 2px; float: left; width: 35%;">
                                                        <asp:TextBox ID="TextGenSubCategory" runat="server" Style="display: none;"></asp:TextBox>
                                                        <asp:DropDownList ID="ddlSubCategory" runat="server" Width="220px" AutoPostBack="True">
                                                        </asp:DropDownList>
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </div>
                                        <div id="wholelengthhunt" style="padding-bottom: 1px; padding-top: 2px; float: left;
                                            width: 100%;">
                                            <div style="float: left; width: 16%;">
                                                <asp:CheckBox ID="chkFreeTextSearch" runat="server" AutoPostBack="true" OnCheckedChanged="chkFreeTextSearch_CheckedChanged" /><%--onclick="ChangeFreeTextSearchStatus(this);" --%>
                                            </div>
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 15%;">--%>
                                            <div style="float: left; width: 15%; margin-top:7px">
                                                <%--added by Nathan 2015-08-15--%>
                                                <asp:TextBox ID="TextOne" runat="server" Style="display: none;"></asp:TextBox>
                                                <asp:TextBox ID="TxtConditionOne" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                                            </div>
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 15%;">--%>
                                            <div style="float: left; width: 15%; margin-top:7px">
                                                <%--added by Nathan 2015-08-15--%>
                                                <asp:TextBox ID="TextTwo" runat="server" Style="display: none;"></asp:TextBox>
                                                <asp:TextBox ID="TxtConditionTwo" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                                            </div>
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 15%;">--%>
                                            <div style="float: left; width: 15%; margin-top:7px">
                                                <%--added by Nathan 2015-08-15--%>
                                                <asp:TextBox ID="TextThree" runat="server" Style="display: none;"></asp:TextBox>
                                                <asp:TextBox ID="TxtConditionThree" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                                            </div>
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 7%;">--%>
                                            <div style="float: left; width: 7%; margin-top:7px">
                                                <asp:TextBox ID="TextRadio" runat="server" Style="display: none;"></asp:TextBox>
                                                <asp:RadioButton ID="rdoAnd" runat="server" GroupName="nexusgroup" />
                                            </div>
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 6%;">--%>
                                            <div style="float: left; width: 6%; margin-top:7px">
                                                <asp:RadioButton ID="rdoOr" runat="server" GroupName="nexusgroup" />
                                            </div>
                                            <input type="hidden" runat="server" id="hdnCacheDataReturnInt" value="0" />
                                            <%--
                                            update by gordon 20160112 - for Update full text index label (veritically center textboxes) U296
                                            <div style="float: left; width: 25%;">--%>
                                            <div style="float: left; width: 25%; margin-top:7px">
                                                <%-- update by gordon 20150812 | For Search Wait Cursor --%>
                                                <%--<asp:Button ID="btnSearch" runat="server" Text="" OnClick="btnSearch_Click" />&nbsp;&nbsp;--%>
                                                <asp:Button ID="btnSearch" runat="server" Text="" OnClientClick="showWait('../../CSS/ForAdmRegWaitCursor.css')"
                                                    OnClick="btnSearch_Click" />&nbsp;&nbsp;
                                                <asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClick="btnAddNew_Click" />&nbsp;&nbsp;
                                                <%--
                                                update by gordon 20150910
                                                <asp:Button ID="btnOutPut" runat="server" Text="" OnClick="btnOutPut_Click" />--%>
                                                <asp:Button ID="btnOutPut" runat="server" Text="" OnClientClick="return ExportClick('../../CSS/ForAdmRegWaitCursor.css',this.id)"
                                                    OnClick="btnOutPut_Click" />
                                                <%--added by Nathan 2015-08-15--%>
                                                <asp:Button ID="BFSearc" runat="server" Text="" OnClick="BFSearc_Click" Style="display: none;" />&nbsp;&nbsp;
                                            </div>
                                        </div>
                                    </div>
                                    <div id="datagrid" style="width: 100%; padding-left: 1px; padding-top: 5px;">
                                        <APJ:CommonGridView ID="grdSearchResult" runat="server" AllowPaging="True" AllowSorting="True"
                                            AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black"
                                            CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" BackColor="White"
                                            BorderWidth="1px" OnRowDataBound="grdSearchResult_RowDataBound" DataKeyNames="StationEventID,HandoverNote"
                                            PageLinkCount="7">
                                            <PagerTemplate>
                                                <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                    <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                            <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                            <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                            &nbsp; &nbsp;
                                                            <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                            &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                                            &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                            <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                            &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                                <asp:ListItem Value="10">10</asp:ListItem>
                                                                <asp:ListItem Value="15">15</asp:ListItem>
                                                                <asp:ListItem Value="20">20</asp:ListItem>
                                                                <asp:ListItem Value="25">25</asp:ListItem>
                                                                <asp:ListItem Value="30">30</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                            <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                            <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                            </asp:Panel>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                            <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                        </asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </PagerTemplate>
                                            <RowStyle CssClass="GridView_Row" />
                                            <HeaderStyle CssClass="GridView_Header" BackColor="#D1F2FF" Font-Bold="True" Font-Names="Arial"
                                                Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False"
                                                ForeColor="#022D72" />
                                            <AlternatingRowStyle CssClass="GridView_AlternativeRow" BackColor="Silver" />
                                            <Columns>
                                                <asp:HyperLinkField DataTextField="EventNo" HeaderText="SOM_EventNo" Target="_self"
                                                    SortExpression="EventNo">
                                                    <ItemStyle CssClass="HandCursorClass" Width="150px" />
                                                </asp:HyperLinkField>
                                                <asp:TemplateField HeaderText="SOM_BookOnOffTime" SortExpression="EventTime">
                                                    <ItemStyle Width="120px" />
                                                    <ItemTemplate>
                                                        <%# FormatDateTime(Eval("EventTime"),true)%><br />
                                                        <%# FormatDateTime(Eval("EventCompleteTime"),true)%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="StaffName" HeaderText="COM_NameOfStaff" SortExpression="StaffName">
                                                    <ItemStyle Width="60px" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="DepartmentCompany" HeaderText="SOM_DepartmentCompany"
                                                    SortExpression="DepartmentCompany">
                                                    <ItemStyle Width="60px" />
                                                </asp:BoundField>
                                                <asp:TemplateField HeaderText="SOM_WorkCategoryAndWorkCatetory" SortExpression="WorkCategory">
                                                    <ItemStyle Width="130px" />
                                                    <ItemTemplate>
                                                        <%# DataBinder.Eval(Container.DataItem, "WorkCategory")%><br />
                                                        <%# DataBinder.Eval(Container.DataItem, "WorkSubCategory")%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SOM_NatureLocation" SortExpression="JobNature">
                                                    <ItemStyle Width="150px" />
                                                    <ItemTemplate>
                                                        <div style="float: left;">
                                                            <asp:Label ID="lblShortContent" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "JobNature").ToString() + "<br />" + DataBinder.Eval(Container.DataItem, "JobLocation").ToString() %>'></asp:Label>
                                                        </div>
                                                        <div style="float: right;">
                                                            <asp:Button ID="btnShowDetails" runat="server" Text="..."></asp:Button>
                                                        </div>
                                                        <div style="display: none">
                                                            <br />
                                                            <asp:Label ID="lblJobNature" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "JobNature") %>'
                                                                __designer:wfdid="w11"></asp:Label>
                                                            <br />
                                                            <asp:Label ID="lblJobLocation" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "JobLocation") %>'
                                                                __designer:wfdid="w12"></asp:Label>
                                                            <br />
                                                            <asp:TextBox ID="txtFullContent" runat="server" __designer:wfdid="w18" TextMode="MultiLine"></asp:TextBox>
                                                        </div>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="COM_Status" SortExpression="EventStatusID">
                                                    <ItemStyle Width="20px" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblFlagStatus" runat="server" Visible="False" __designer:wfdid="w1"
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "EventStatusID")%>'></asp:Label><asp:Image
                                                                ID="imgStatus" runat="server" Enabled="False" __designer:wfdid="w2"></asp:Image><div
                                                                    style="display: none">
                                                                    <asp:Label ID="lblEventStatusDesc" runat="server" Text='<%# Bind("EventStatusDesc") %>'
                                                                        __designer:wfdid="w3"></asp:Label></div>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SOM_Handover" SortExpression="FlagHandover">
                                                    <ItemStyle Width="20px" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblFlagHandover" runat="server" Visible="False" __designer:wfdid="w5"
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "FlagHandover")%>'></asp:Label><asp:Image
                                                                ID="imgHandOver" runat="server" Enabled="False" __designer:wfdid="w6"></asp:Image>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="COM_HighLight" SortExpression="HighLight">
                                                    <ItemStyle Width="20px" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblFlagHighlight" runat="server" Visible="False" __designer:wfdid="w8"
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "HighLight")%>'></asp:Label><asp:Image
                                                                ID="imgHighlight" runat="server" Enabled="False" __designer:wfdid="w9"></asp:Image>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <EmptyDataRowStyle CssClass="GridView_Header" />
                                            <EmptyDataTemplate>
                                                <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                                                    <asp:TableRow ID="TableRow1" runat="server">
                                                        <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;"
                                                            Width="105px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;"
                                                            Width="105px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;"
                                                            Width="60px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell4" runat="server" Style="border-right: black 1px solid;"
                                                            Width="60px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell5" runat="server" Style="border-right: black 1px solid;"
                                                            Width="130px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell6" runat="server" Style="border-right: black 1px solid;"
                                                            Width="150px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell7" runat="server" Style="border-right: black 1px solid;"
                                                            Width="20px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell8" runat="server" Style="border-right: black 1px solid;"
                                                            Width="20px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell9" runat="server" Width="20px"></asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </EmptyDataTemplate>
                                        </APJ:CommonGridView>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <%-- Add End --%>
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 33px; width: 1142px;">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
<script type="text/javascript">
    setSearchCookie();
</script>
</html>
